package com.joshua.spring.gateway.service;

import org.springframework.cloud.gateway.route.RouteDefinition;
import org.springframework.context.ApplicationEventPublisherAware;

/**
 * projectName dragon-cloud
 * package com.joshua.spring.gateway.service
 * classname  DynamicRouteService
 * <p>
 * description 动态路由配置
 * </p>
 *
 * @author <a href="mailto:joshualwork@163.com">joshua_liu</a>
 * @date 2020/8/20 16:44
 */
public interface DynamicRouteService extends ApplicationEventPublisherAware {
    /**
     * description:
     *
     * @param definition
     * @return {@link String}
     * @throws
     * @author <a href="mailto:joshualwork@163.com">joshua_liu</a>
     * @date 2020/8/22 9:50
     */
    String add(RouteDefinition definition);

    /**
     * description:
     *
     * @param routeId
     * @return {@link String}
     * @throws
     * @author <a href="mailto:joshualwork@163.com">joshua_liu</a>
     * @date 2020/8/22 9:51
     */
    String delete(String routeId);

    /**
     * description:
     *
     * @param definition
     * @return {@link String}
     * @throws
     * @author <a href="mailto:joshualwork@163.com">joshua_liu</a>
     * @date 2020/8/22 9:51
     */
    String update(RouteDefinition definition);

}
